<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateMessageTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('message', function (Blueprint $table) {
            $table->increments('mid');
            $table->string('tip') -> nullable() -> comment('留言标题');
            $table->string('uid') -> nullable() -> comment('用户的id');
            $table->string('content') -> nullable() -> comment('留言内容');
            $table->string('auditing') -> default('1') -> comment('发表状态1待核2审过');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::drop('message');
    }
}
